// Copyright (c) 2022 Presto Labs Pte. Ltd.
// Author: ziyan

#pragma once

#include <iomanip>
#include <sstream>
#include <string>

#include "coin2/base/time.h"
#include "coin2/exchange/feed.pb.h"

struct Wallet {
  int64_t timestamp;
  bool can_deposit;
  bool can_withdraw;
  bool blockchain_delay;

  void Clear() {
    timestamp = 0;
    can_deposit = true;
    can_withdraw = true;
    blockchain_delay = false;
  }
};

inline std::ostream& operator<<(
    std::ostream& os,
    const Wallet& wallet) {
  os << "Wallet ";
  os << "(can_deposit:";
  os << std::setw(10);
  os << wallet.can_deposit;
  os << ",can_withdraw:";
  os << std::setw(10);
  os << wallet.can_withdraw;
  os << ",blockchain_delay:";
  os << std::setw(10);
  os << wallet.blockchain_delay;
  os << ")";
  return os;
}
